package com.zenithmind.exam.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import jakarta.validation.constraints.NotBlank;
import java.time.LocalDateTime;

/**
 * 考试题目关联实体类
 * 
 * @author ZenithMind
 * @since 2024-07-01
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Schema(name = "考试题目关联实体", description = "考试与题目的关联关系")
@TableName("exam_question_rel")
public class ExamQuestionRel {

    /**
     * 主键ID
     */
    @Schema(description = "主键ID")
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 考试ID
     */
    @NotBlank(message = "考试ID不能为空")
    @Schema(description = "考试ID")
    private String examId;

    /**
     * 题目ID
     */
    @NotBlank(message = "题目ID不能为空")
    @Schema(description = "题目ID")
    private String questionId;

    /**
     * 题目顺序
     */
    @Schema(description = "题目顺序")
    private Integer questionOrder;

    /**
     * 题目分值
     */
    @Schema(description = "题目分值")
    private Integer score;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private LocalDateTime createTime;
}
